package com.antaohua.tools.api.entity;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.antaohua.tools.framework.base.interfase.CreateDateInterfase;
import com.antaohua.tools.framework.base.interfase.UpdateDateInterfase;
import com.antaohua.tools.framework.base.model.BaseModel;
import com.antaohua.tools.framework.base.model.UUIDIdentityModel;

@Entity
@Table(name="interface_key")
public class InterfaceProviderKeyEntity extends UUIDIdentityModel implements Serializable, CreateDateInterfase, UpdateDateInterfase{

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	
	
	
	@Column(name ="key_name",length=100,nullable=false)
	private String keyName;
	@Column(name ="Key_value",length=100,nullable=false)
	private String KeyValue;
	
	
	@ManyToOne(cascade = CascadeType.REFRESH, fetch = FetchType.EAGER)
	@JoinColumn(name = "provider_id", insertable = false, updatable = false)
	private InterfaceProviderEntity provider;
	
	@Column(name = "provider_id", length = 36,nullable = false,columnDefinition="char(36)")
	private String providerId;
	
	@Column(name = "CREATEDATE", nullable = false)
	private Date createDate;
	@Column(name = "UPDATEDATE")
	private Date updateDate;


	public Date getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return this.updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	
	
	@Column(name ="remark",length=1000)
	private String remark;
	
	
	
	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	
	public String getKeyName() {
		return keyName;
	}
	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}
	public String getKeyValue() {
		return KeyValue;
	}
	public void setKeyValue(String keyValue) {
		KeyValue = keyValue;
	}


	public InterfaceProviderEntity getProvider() {
		return provider;
	}


	public void setProvider(InterfaceProviderEntity provider) {
		this.provider = provider;
	}


	public String getProviderId() {
		return providerId;
	}


	public void setProviderId(String providerId) {
		this.providerId = providerId;
	}
	
	
	
	
}
